#ifndef GAME_OBJECT_H
#define GAME_OBJECT_H

#include <map>
#include "Vec3.h"

namespace Engine
{
	class GameObject
	{
		private:
			//counter not meant to be accessed
			static unsigned int s_currentGameObjectID;
			//not meant to be accessed by derived classes, only meant to be set once in constructor
			unsigned int m_gameObjectID;

		protected:
			bool m_initialized;

		public:
			virtual ~GameObject() = 0;
			virtual void Update() {}
			virtual void Draw() {}
			virtual const char* GetTypeName() const = 0;
			virtual unsigned int GetTypeHash() const = 0;
			
			virtual void Initialize();
			virtual void Release();

			GameObject();

			unsigned int GetGameObjectID() const {return m_gameObjectID;}
			bool IsInitialized() const {return m_initialized;}
	};

	typedef std::map<unsigned int, GameObject*> MapGameObject;
}

#endif

// ---
// -- Game Object Singletonized Factory
//

#ifndef __GAME_OBJECT_FACTORY_H_
#define __GAME_OBJECT_FACTORY_H_

#include "Factory.h"

typedef Engine::Singleton<Factory<Engine::GameObject>> GameObjectFactory_;

#endif